<?php
namespace Common\Models;
use Common\BaseModel;
class DouyinCategory extends BaseModel
{
	public $res;
	public $redis_key="";
    public function initialize()
    {
        parent::initialize();
        $this->setSource('f_douyin_category');
    }

    public function getdouyinCategroy(){
	    $result = $this::find(array(
                'order'=>'dy_id asc,cat_id asc'
            )
        );
	    if($result){
	        return $result->toarray();
        }else{
	        return false;
        }
    }


    /**
     * 获取分类
     */
    public function category(){
        $result = $this::find(array(
                'columns'=>'cat_id as category_id,site,name,img_url as image',
                'order'=>'dy_id asc,cat_id asc'
            )
        );
        if($result){
            return $result->toarray();
        }else{
            return false;
        }
    }


}
